<?php 
define('__ROOT__', dirname(dirname(__FILE__))); 
include_once(__ROOT__.'/includes/header.php'); ?>
<link rel="stylesheet" href="<?php echo base_url("assets/css/jquery.fancybox.css"); ?>" />
<div class="span9">
	<ul class="breadcrumb">
		<li>
			<a href="<?php echo base_url('/home'); ?>">Home</a> <span class="divider">/</span>
		</li>
		<li>
			<a href="<?php echo base_url('/classifieds'); ?>">Classifieds</a>
		</li>
		<?php if (isset($bookmark)): ?>
		<span class="divider">/</span>
		<li>
			<?php echo $bookmark; ?></a>
		</li>
		<?php endif;?>
	</ul>
	<div class="main_content detail-product">	
			<h3 class="title"><?php echo $cdetails->cat_descriptions ?></h3>			
			<div class="row-fluid">
				<div class="span4">
					<a href="<?php echo site_url((isset($cdetails->primary_image) ? '/assets/uploads/classifieds/' . $cdetails->primary_image : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 1"><img alt="" src="<?php echo site_url((isset($cdetails->primary_image) ? '/assets/uploads/classifieds/' . $cdetails->primary_image : '/assets/uploads/dummy.png')); ?>"></a>												
					<ul class="thumbnails small">								
						<li class="span4">
							<a href="<?php echo site_url((isset($cdetails->small_image1) ? '/assets/uploads/classifieds/' . $cdetails->small_image1 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 2"><img src="<?php echo site_url((isset($cdetails->small_image1) ? '/assets/uploads/classifieds/' . $cdetails->primary_image : '/assets/uploads/dummy.png')); ?>" alt=""></a>
						</li>								
						<li class="span4">
							<a href="<?php echo site_url((isset($cdetails->small_image2) ? '/assets/uploads/classifieds/' . $cdetails->small_image2 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 3"><img src="<?php echo site_url((isset($cdetails->small_image2) ? '/assets/uploads/classifieds/' . $cdetails->small_image2 : '/assets/uploads/dummy.png')); ?>" alt=""></a>
						</li>													
						<li class="span4">
							<a href="<?php echo site_url((isset($cdetails->small_image3) ? '/assets/uploads/classifieds/' . $cdetails->small_image3 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 4"><img src="<?php echo site_url((isset($cdetails->small_image3) ? '/assets/uploads/classifieds/' . $cdetails->small_image3 : '/assets/uploads/dummy.png')); ?>" alt=""></a>
						</li>
					</ul>
				</div>
				<div class="span8">
					<ul class="social pull-right">
						<li>									
							<div class="fb-like" send="false" layout="button_count" data-href="example.org"></div>
							<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
						</li>
						<li>
							<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-url="http://a-smart.vn/products/itab-a989i3g-goi-dien.html" data-text="iTab A989i(3G)" data-via="a-smart.vn">Tweet</a>
							<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
						</li>
					</ul>
				</div>
				<div class="span8">
					<h4>
						<?php if (isset($cdetails->percentage) && $cdetails->isSpecialDiscount == 1)
							echo '<span class="label label-important">' . $cdetails->percentage .'%</span> ';
							echo $cdetails->title; ?></h4>
					<?php echo $cdetails->description; ?>
					<h4><strong><?php echo $cdetails->price; ?></strong> <sup><?php echo $cdetails->price_denote; ?></sup></h4>								
					<div class="contact-information">
						<h5>CONTACT INFORMATION</h5>
						<address>				
							
						</address>
						<p><strong>Contact Name: </strong><?php echo $cdetails->contact_person; ?><br/>
						<strong>Phone: </strong> <?php echo $cdetails->contact_number; ?><br/>
						<strong>E-mail: </strong> <a href="#myModal" role="button" data-toggle="modal"><?php echo $cdetails->contact_email; ?></a><br/>
						<strong>URL: </strong> <a href="#" target="_blank"></a></p>
					</div>							
				</div>							
			</div>
			<a href="#tabanchor"></a>
			<div class="row-fluid">
				<div class="span12">
					<ul class="nav nav-tabs" id="myTab">
						<li class="active"><a href="#home">Advertiser's Other Ads</a></li>
						<li><a href="#profile">MESSAGE TO ADVERTISER</a></li>
					</ul>							 
					<div class="tab-content">
						<div class="tab-pane active" id="home">
							<div class="span7 well">
								<div class="other_info">
									<?php foreach ($others as $other): ?>
										 <p>
											<strong><a href="<?php echo base_url('/browse/') . $cdetails->id ; ?>"><?php echo $other->title; ?></a></strong>
											<br/>in <a href="<?php echo base_url('/browse/') . $cdetails->id; ?>"><?php echo $other->cat_descriptions; ?></a> - <?php echo date ("d/m/Y",strtotime($other->posted_date)); ?>					
										</p>
									<?php endforeach ?>
								</div>
							</div>
						</div>
						<div class="tab-pane" id="profile">
						<form class="form-horizontal">
						  <div class="control-group">
							<label class="control-label" for="inputEmail">Email</label>
							<div class="controls">
							  <input type="text" id="inputEmail" placeholder="Email">
							</div>
						  </div>
						  <div class="control-group">
							<label class="control-label" for="inputName">Name</label>
							<div class="controls">
							  <input type="text" id="inputName" placeholder="Full Name">
							</div>
						  </div>
						  <div class="control-group">
							<label class="control-label" for="inputMsg">Message</label>
							<div class="controls">
							  <input type="textarea" id="inputMsg" placeholder="Message">
							  <input type="hidden" id="inputUrl" value="<?php echo base_url(); ?>api/message/send/format/json">
							</div>
						  </div>
						  <div class="control-group">
							<div class="controls">
							   <a id="messagesubmit" class="btn btn-primary">Send</a>
							   <button type="reset" class="btn">Cancel</button>
							</div>
						  </div>
						</form>
						</div>
					</div>							
				</div>							
			</div>							
	</div>
</div>
<?php 
include_once(__ROOT__.'/includes/footer.php'); 	
?>

   
